From: Felix Fietkau Date: Mon, 20 Apr 2009 21:37:19 +0000 (+0000) Subject: olsrd: don't mess with the system's ipv4/ipv6 forwarding settings X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=ee78419a42fff01ec0e3dddaa787e1bbe966a4c7;p=feed%2Frouting.git olsrd: don't mess with the system's ipv4/ipv6 forwarding settings git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/olsrd@15309 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/patches/100-no_forwarding_override.patch b/patches/100-no_forwarding_override.patch new file mode 100644 index 0000000..6e225e3 --- /dev/null +++ b/patches/100-no_forwarding_override.patch @@ -0,0 +1,34 @@ +--- a/src/linux/net.c ++++ b/src/linux/net.c +@@ -106,6 +106,7 @@ bind_socket_to_device(int sock, char *de + int + enable_ip_forwarding(int version) + { ++#if 0 + FILE *proc_fwd; + const char *const procfile = version == AF_INET ? "/proc/sys/net/ipv4/ip_forward" : "/proc/sys/net/ipv6/conf/all/forwarding"; + +@@ -141,6 +142,7 @@ enable_ip_forwarding(int version) + } + fclose(proc_fwd); + } ++#endif + return 1; + } + +@@ -267,6 +269,7 @@ restore_settings(int version) + OLSR_PRINTF(1, "Restoring network state\n"); + + /* Restore IP forwarding to "off" */ ++#if 0 + if (orig_fwd_state == '0') { + const char *const procfile = version == AF_INET ? "/proc/sys/net/ipv4/ip_forward" : "/proc/sys/net/ipv6/conf/all/forwarding"; + FILE *proc_fd; +@@ -279,6 +282,7 @@ restore_settings(int version) + fclose(proc_fd); + } + } ++#endif + + /* Restore global ICMP redirect setting */ + if (orig_global_redirect_state != '0') {